/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package E_implicito_LinearQuotient;

/**
 *
 * @author rafaelob
 */
public class Celula {

    private Record record;
    private int posicao;

    public Celula(int posicao) {
        record = null;
        this.posicao = posicao;
    }

    public int getPosicao() {
        return posicao;
    }

    public Record getRecord() {
        return record;
    }


    public Boolean searchRecord(int chave) {
         if (record != null && record.getChave() == chave) {
            return true;
        } else {
            return false;
        }
    }

    public boolean insertRecord(Record record) {
        if (this.record == null) {
            this.record = record;
            return true;
        } else {
            return false;
        }
    }
}
